<?php
session_start();
mysql_connect("127.0.0.1","root","sd2013");
mysql_select_db("mathRomp");
$url = 'http://localhost/mathRomp/addProblems.php';
$_SESSION['numStudents'] = $_REQUEST['numStudents'];
$_SESSION['numQuestions'] = $_REQUEST['numQuestions'];
//print("numStudents=".$numStudents);
$q=mysql_query("INSERT INTO `Assignment-Teacher`(`teacherId`, `assignmentId`, `completed`, `numStudents`, `assignmentName`) VALUES (".$_SESSION['teacherId'].", NULL, 0, ".$_REQUEST['numStudents'].", '".$_REQUEST['assignmentName']."')");
$_SESSION['assignId'] = mysql_insert_id();
mysql_close();
header("Location: $url");